package org.icnmasjid.member.model;
// Generated Dec 6, 2008 9:23:44 PM by Hibernate Tools 3.1.0.beta4

import java.sql.Date;


/**
 * @struts.form include-all="true" extends="BaseForm"
 * @hibernate.class
 *         table="person_payment"
 *     
 */

public class PersonPayment extends org.icnmasjid.member.model.BaseObject implements java.io.Serializable {


    // Fields    

    private Integer id;
    private double paymentAmount;
    private Date paymentDate;
    private String paymentMethod;


    // Constructors

    /** default constructor */
    public PersonPayment() {
    }

	/** minimal constructor */
    public PersonPayment(double paymentAmount, Date paymentDate) {
        this.paymentAmount = paymentAmount;
        this.paymentDate = paymentDate;
    }
    
    /** full constructor */
    public PersonPayment(double paymentAmount, Date paymentDate, String paymentMethod) {
        this.paymentAmount = paymentAmount;
        this.paymentDate = paymentDate;
        this.paymentMethod = paymentMethod;
    }
    

   
    // Property accessors
    /**       
     *      *            @hibernate.id
     *             generator-class="native"
     *             type="java.lang.Integer"
     *             column="id"
     *         
     */

    public Integer getId() {
        return this.id;
    }
    
    public void setId(Integer id) {
        this.id = id;
    }
    /**       
     *      *            @hibernate.property
     *             column="payment_amount"
     *             length="22"
     *             not-null="true"
     *         
     */

    public double getPaymentAmount() {
        return this.paymentAmount;
    }
    
    public void setPaymentAmount(double paymentAmount) {
        this.paymentAmount = paymentAmount;
    }
    /**       
     *      *            @hibernate.property
     *             column="payment_date"
     *             length="10"
     *             not-null="true"
     *         
     */

    public Date getPaymentDate() {
        return this.paymentDate;
    }
    
    public void setPaymentDate(Date paymentDate) {
        this.paymentDate = paymentDate;
    }
    /**       
     *      *            @hibernate.property
     *             column="payment_method"
     *             length="20"
     *         
     */

    public String getPaymentMethod() {
        return this.paymentMethod;
    }
    
    public void setPaymentMethod(String paymentMethod) {
        this.paymentMethod = paymentMethod;
    }
   

    /**
     * toString
     * @return String
     */
     public String toString() {
	  StringBuffer buffer = new StringBuffer();

      buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" [");
      buffer.append("paymentAmount").append("='").append(getPaymentAmount()).append("' ");			
      buffer.append("paymentDate").append("='").append(getPaymentDate()).append("' ");			
      buffer.append("paymentMethod").append("='").append(getPaymentMethod()).append("' ");			
      buffer.append("]");
      
      return buffer.toString();
     }


   public boolean equals(Object other) {
         if ( (this == other ) ) return true;
		 if ( (other == null ) ) return false;
		 if ( !(other instanceof PersonPayment) ) return false;
		 PersonPayment castOther = ( PersonPayment ) other; 
         
		 return ( (this.getId()==castOther.getId()) || ( this.getId()!=null && castOther.getId()!=null && this.getId().equals(castOther.getId()) ) )
 && (this.getPaymentAmount()==castOther.getPaymentAmount())
 && ( (this.getPaymentDate()==castOther.getPaymentDate()) || ( this.getPaymentDate()!=null && castOther.getPaymentDate()!=null && this.getPaymentDate().equals(castOther.getPaymentDate()) ) )
 && ( (this.getPaymentMethod()==castOther.getPaymentMethod()) || ( this.getPaymentMethod()!=null && castOther.getPaymentMethod()!=null && this.getPaymentMethod().equals(castOther.getPaymentMethod()) ) );
   }
   
   public int hashCode() {
         int result = 17;
         
         result = 37 * result + ( getId() == null ? 0 : this.getId().hashCode() );
         result = 37 * result + (int) this.getPaymentAmount();
         result = 37 * result + ( getPaymentDate() == null ? 0 : this.getPaymentDate().hashCode() );
         result = 37 * result + ( getPaymentMethod() == null ? 0 : this.getPaymentMethod().hashCode() );
         return result;
   }   





}
